<?php
class Common_System_Code
{
    private static $alphabet = array(   "A","B","C","D","E","F","G","H","I","J",
                                        "K","L","M","N","O","P","Q","R","S","T",
                                        "U","V","W","X","Y","Z",
                                        "0","1","2","3","4","5","6","7","8","9");

     public static function getSimpleCode($chars)
     {
         $code="";

         for($i=0; $i < $chars ; $i++)
         {
             $code .= self::$alphabet[rand(0, 35)];
         }

         return $code;
     }
}
?>